Optimal. Leaf size=44 \[ \frac {b d x}{2}+\frac {d (1+c x)^2 \left (a+b \tanh ^{-1}(c x)\right )}{2 c}+\frac {b d \log (1-c x)}{c} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.02, antiderivative size = 44, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 3, integrand size = 15, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, Rules used = {6063, 641, 45}
\begin {gather*} \frac {d (c x+1)^2 \left (a+b \tanh ^{-1}(c x)\right )}{2 c}+\frac {b d \log (1-c x)}{c}+\frac {b d x}{2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 45
Rule 641
Rule 6063
Rubi steps
\begin {align*} \int (d+c d x) \left (a+b \tanh ^{-1}(c x)\right ) \, dx &=\frac {d (1+c x)^2 \left (a+b \tanh ^{-1}(c x)\right )}{2 c}-\frac {b \int \frac {(d+c d x)^2}{1-c^2 x^2} \, dx}{2 d}\\ &=\frac {d (1+c x)^2 \left (a+b \tanh ^{-1}(c x)\right )}{2 c}-\frac {b \int \frac {d+c d x}{\frac {1}{d}-\frac {c x}{d}} \, dx}{2 d}\\ &=\frac {d (1+c x)^2 \left (a+b \tanh ^{-1}(c x)\right )}{2 c}-\frac {b \int \left (-d^2-\frac {2 d^2}{-1+c x}\right ) \, dx}{2 d}\\ &=\frac {b d x}{2}+\frac {d (1+c x)^2 \left (a+b \tanh ^{-1}(c x)\right )}{2 c}+\frac {b d \log (1-c x)}{c}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] Leaf count is larger than twice the leaf count of optimal. \(95\) vs. \(2(44)=88\).
time = 0.01, size = 95, normalized size = 2.16 \begin {gather*} a d x+\frac {b d x}{2}+\frac {1}{2} a c d x^2+b d x \tanh ^{-1}(c x)+\frac {1}{2} b c d x^2 \tanh ^{-1}(c x)+\frac {b d \log (1-c x)}{4 c}-\frac {b d \log (1+c x)}{4 c}+\frac {b d \log \left (1-c^2 x^2\right )}{2 c} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.12, size = 70, normalized size = 1.59
method | result | size |
derivativedivides | \(\frac {d a \left (\frac {1}{2} c^{2} x^{2}+c x \right )+\frac {d b \arctanh \left (c x \right ) c^{2} x^{2}}{2}+b c d x \arctanh \left (c x \right )+\frac {d b c x}{2}+\frac {3 d b \ln \left (c x -1\right )}{4}+\frac {d b \ln \left (c x +1\right )}{4}}{c}\) | \(70\) |
default | \(\frac {d a \left (\frac {1}{2} c^{2} x^{2}+c x \right )+\frac {d b \arctanh \left (c x \right ) c^{2} x^{2}}{2}+b c d x \arctanh \left (c x \right )+\frac {d b c x}{2}+\frac {3 d b \ln \left (c x -1\right )}{4}+\frac {d b \ln \left (c x +1\right )}{4}}{c}\) | \(70\) |
risch | \(\frac {d b x \left (c x +2\right ) \ln \left (c x +1\right )}{4}-\frac {d c b \,x^{2} \ln \left (-c x +1\right )}{4}+\frac {d c a \,x^{2}}{2}-\frac {d b x \ln \left (-c x +1\right )}{2}+a d x +\frac {b d x}{2}+\frac {3 b d \ln \left (-c x +1\right )}{4 c}+\frac {d b \ln \left (c x +1\right )}{4 c}\) | \(89\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 85 vs.
\(2 (40) = 80\).
time = 0.26, size = 85, normalized size = 1.93 \begin {gather*} \frac {1}{2} \, a c d x^{2} + \frac {1}{4} \, {\left (2 \, x^{2} \operatorname {artanh}\left (c x\right ) + c {\left (\frac {2 \, x}{c^{2}} - \frac {\log \left (c x + 1\right )}{c^{3}} + \frac {\log \left (c x - 1\right )}{c^{3}}\right )}\right )} b c d + a d x + \frac {{\left (2 \, c x \operatorname {artanh}\left (c x\right ) + \log \left (-c^{2} x^{2} + 1\right )\right )} b d}{2 \, c} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.36, size = 77, normalized size = 1.75 \begin {gather*} \frac {2 \, a c^{2} d x^{2} + 2 \, {\left (2 \, a + b\right )} c d x + b d \log \left (c x + 1\right ) + 3 \, b d \log \left (c x - 1\right ) + {\left (b c^{2} d x^{2} + 2 \, b c d x\right )} \log \left (-\frac {c x + 1}{c x - 1}\right )}{4 \, c} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 75 vs.
\(2 (37) = 74\).
time = 0.18, size = 75, normalized size = 1.70 \begin {gather*} \begin {cases} \frac {a c d x^{2}}{2} + a d x + \frac {b c d x^{2} \operatorname {atanh}{\left (c x \right )}}{2} + b d x \operatorname {atanh}{\left (c x \right )} + \frac {b d x}{2} + \frac {b d \log {\left (x - \frac {1}{c} \right )}}{c} + \frac {b d \operatorname {atanh}{\left (c x \right )}}{2 c} & \text {for}\: c \neq 0 \\a d x & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 211 vs.
\(2 (40) = 80\).
time = 0.42, size = 211, normalized size = 4.80 \begin {gather*} -c {\left (\frac {b d \log \left (-\frac {c x + 1}{c x - 1} + 1\right )}{c^{2}} - \frac {{\left (\frac {2 \, {\left (c x + 1\right )} b d}{c x - 1} - b d\right )} \log \left (-\frac {c x + 1}{c x - 1}\right )}{\frac {{\left (c x + 1\right )}^{2} c^{2}}{{\left (c x - 1\right )}^{2}} - \frac {2 \, {\left (c x + 1\right )} c^{2}}{c x - 1} + c^{2}} - \frac {b d \log \left (-\frac {c x + 1}{c x - 1}\right )}{c^{2}} - \frac {\frac {4 \, {\left (c x + 1\right )} a d}{c x - 1} - 2 \, a d + \frac {{\left (c x + 1\right )} b d}{c x - 1} - b d}{\frac {{\left (c x + 1\right )}^{2} c^{2}}{{\left (c x - 1\right )}^{2}} - \frac {2 \, {\left (c x + 1\right )} c^{2}}{c x - 1} + c^{2}}\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.86, size = 65, normalized size = 1.48 \begin {gather*} \frac {d\,\left (2\,a\,x+b\,x+2\,b\,x\,\mathrm {atanh}\left (c\,x\right )\right )}{2}+\frac {c\,d\,\left (a\,x^2+b\,x^2\,\mathrm {atanh}\left (c\,x\right )\right )}{2}-\frac {d\,\left (b\,\mathrm {atanh}\left (c\,x\right )-b\,\ln \left (c^2\,x^2-1\right )\right )}{2\,c} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________